# -*- coding: UTF-8 -*-
import web
import sqlite3
# 测试
urls = (
	'/', 'index'
)
app = web.application(urls, globals())
render = web.template.render('templates')
class index:
	def GET(self):
		db=web.database(dbn='sqlite',db='edi.db3')
		cd=db.select('edi',what='cd_no,cd_company,cd_orderno',where='cd_company like "%县%"')
		return render.hello(cd)
		# con=sqlite3.connect(r'e:\edi\edi.sqlite3')
		# con.text_factory=str
		# cur=con.cursor()
		# cur.execute('select * from cd')
		# cd=cur.fetchone()
		# print cd[0]
if __name__ == "__main__":
    app.run()